{% import "trees/rhel7.j2" as rhel7 %}
{% set distro_requires %}
  <distro_family op="=" value="RedHatEnterpriseLinux7"/>
  <distro_variant op="=" value="Server"/>
  <distro_name op="=" value="RHEL-7.6"/>
{% endset %}
{% macro repo_url(suffix) -%}
  http://download.eng.rdu.redhat.com/rhel-7/rel-eng/updates/RHEL-7/latest-RHEL-7.6/compose/Server/{{ ARCH }}/{{ suffix }}
{%- endmacro %}
{% macro repo_cmd(idx, suffix) -%}
  {%- filter unindent %}
    cat >/etc/yum.repos.d/latest{{ idx }}.repo <<EOF
    [latest-{{ idx }}]
    name=latest-{{ idx }}
    baseurl={{ repo_url(suffix) }}
    enabled=1
    gpgcheck=0
    skip_if_unavailable=1
    EOF
  {%- endfilter -%}
{%- endmacro %}
{% set ks_append | unindent %}
  <ks_append><![CDATA[
  %post
  # Enable latest compose repos
  {{ repo_cmd(0, "os") }}
  {{ repo_cmd(2, "debug") }}
  %end
  ]]></ks_append>
{% endset %}
{# add efi=runtime otherwise reboot using kernel-rt will fail on machines with UEFI #}
{% if "rt" in COMPONENTS %}
  {% set kernel_options_post = "efi=runtime" %}
{% endif %}
